package xyz.lisys.service.impl;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import xyz.lisys.dao.CedUsersDao;
import xyz.lisys.model.CedUsers;
import xyz.lisys.service.CedUsersService;

import javax.annotation.Resource;

@Service("userService")
public class CedUsersServiceImpl implements CedUsersService {
    @Resource
    private CedUsersDao usersDao;

    @Transactional(rollbackFor = {Exception.class, RuntimeException.class})
    @Override
    public CedUsers getUser(Integer id) {
        return usersDao.getUser(id);
    }

    @Transactional(rollbackFor = {Exception.class, RuntimeException.class})
    @Override
    public void saveUser(CedUsers user) {
        usersDao.saveUser(user);
    }
}
